package movie.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import movie.entity.CinemaName;
import movie.mapper.CinemaNameMapper;
import movie.service.CinemaNameService;

@Service
public class CinemaNameServiceImpl implements CinemaNameService {

	@Autowired
	private CinemaNameMapper cinemaNameMapper;
	@Override
	public int findByCinemaNameToCinemaId(String cinemaName) {
		// TODO Auto-generated method stub
		return cinemaNameMapper.findByCinemaNameToCinemaId(cinemaName);
	}
	
	@Override
	public String findByCinemaIdToCinemaName(int cinemaId) {
		// TODO Auto-generated method stub
		return cinemaNameMapper.findByCinemaIdToCinemaName(cinemaId);
	}
	
	@Override
	public CinemaName Login(CinemaName c) {
		String cname = c.getCinemaLoginname();
		return cinemaNameMapper.findByLoginName(cname);
	}

	
	@Override
	public List<String> findAllCinemaName()
	{
		return cinemaNameMapper.findAllCinemaName();
	}
	@Override
	public List<CinemaName> findAll() {
		return cinemaNameMapper.findAllCinema();
	}
	@Override
	public CinemaName findCinema(int cinemaId) {
		return cinemaNameMapper.findCinema(cinemaId);

	}
}
